

#ifndef __CE_H__
#define __CE_H__

#define SAVE_ADD(x) if ((x)) (x)->AddRef ()
#define SAVE_RELEASE(x) if ((x)) (x)->Release ()
#define SAVE_SET(dst, src) SAVE_ADD(src); SAVE_RELEASE(dst); (dst)=(src)


enum RenderSort
{
	CERS_NoSort,
	CERS_SortMaterial,
	CERS_SortEffect,
};

enum ClippingResult
{
	CR_Out			= 0,
	CR_In				= 1,
	CR_InOut		= 2,
};

enum LODStrategy
{
	/// Render no matter what lod stage we are.
	LODS_Pass, 
	/// Don't render at all.
	LODS_Reject,
	/// Render only when in stage 0
	LODS_StageZero,
	/// Perform LOD when stage greater 0
	LODS_StageGreaterZero,
	/// Perform LOD over all stages
	LODS_Standard,
};

enum TerrainSize
{
	TS_9				= 9,
	TS_17				= 17,
	TS_33				= 33,
	TS_65				= 65,
	TS_129			= 129,
	TS_257			= 257,
	TS_513			= 513,
	TS_1025			= 1025,
};

enum TerrainPatchSize
{
	TPS_9				= 9,
	TPS_17			= 17,
	TPS_33			= 33,
	TPS_65			= 65,
	TPS_129			= 129,
	TPS_257			= 257,
	TPS_513			= 513,
};


enum CullingMode
{
	CM_Cull									= 0,
	CM_CullNoCullChildren		= 1,
	CM_NoCull								= 2,
	CM_NoCullCullChildren		= 3,
};

#endif /* ! __CE_H__ */
